package cn.boat.router.consumer;

import cn.boat.router.utils.ZkCuratorUtils;
import cn.boat.router.utils.ZkCuratorUtils.ZKConfig;

public class GetZookeeperProperties {
    private String zookeeperIpPort;
    private String zookeeperIp;
    private String zookeeperPort;

    public GetZookeeperProperties() {
        zookeeperIpPort ="";
        zookeeperIp = "";
        zookeeperPort ="";
    }

    public String getZookeeperIpPort() {
        return zookeeperIpPort;
    }

    public void setZookeeperIpPort(String zookeeperIpPort) {
        this.zookeeperIpPort = zookeeperIpPort;
    }

    public String getZookeeperIp() {
        return zookeeperIp;
    }

    public void setZookeeperIp(String zookeeperIp) {
        this.zookeeperIp = zookeeperIp;
    }

    public String getZookeeperPort() {
        return zookeeperPort;
    }

    public void setZookeeperPort(String zookeeperPort) {
        this.zookeeperPort = zookeeperPort;
    }

    public void getPropertiesByName(){
        ZkCuratorUtils zkCuratorUtils = new ZkCuratorUtils();
        ZKConfig zkConfig = zkCuratorUtils.loadZkConfigFromLocalFile();
        zookeeperIpPort = zkConfig.zkConnect;
    }
}
